//
//  FQAutoScrollViewCell.swift
//  SwiftProject
//
//  Created by 董駸 on 2023/4/7.
//

import UIKit

class FQAutoScrollViewCell: UITableViewCell {

    var dict : [String : String] = [:] {
        didSet {
            titleLb.text = dict["title"];
            dataLb.text = dict["data"];
            timeLb.text = dict["time"];
        }
    }
    let titleLb = QMUILabel(font: .rSFont(13), textColor: .color102)
    let dataLb = QMUILabel(font: .rSFont(13), textColor: .color102)
    let timeLb = QMUILabel(font: .rSFont(13), textColor: .color102)
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        selectionStyle = .none
        
        contentView.addSubview(titleLb)
        titleLb.snp.makeConstraints { make in
            make.left.equalTo(10);
            make.centerY.equalToSuperview()
        }
 
        contentView.addSubview(dataLb)
        dataLb.snp.makeConstraints { make in
            make.left.equalTo(100);
            make.centerY.equalToSuperview()
        }

        contentView.addSubview(timeLb)
        timeLb.snp.makeConstraints { make in
            make.right.equalTo(-30);
            make.centerY.equalToSuperview()
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
